// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 生成卡密 POST /api/care/generate */
export async function generateCareCodeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: {
    careCodeCount: number;
    careCodeType: string;
    careCodeLevel: string;
  },
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseArrayListString_>('/api/care/generate', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 使用卡密 POST /api/care/use */
export async function useCareCodeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: {
    careCode: string;
    userAccount: string;
  },
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/care/use', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 查询卡密列表 POST /api/care/query */
export async function queryCareCodeListUsingPost(
  body: API.CareCodeRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageCareCode_>('/api/care/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 查询卡密被哪个用户使用 POST /api/care/queryUser */
export async function getUserByCardCodeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: {
    CareCode: string;
  },
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserVO_>('/api/care/queryUser', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 封禁卡密 POST /api/care/ban */
export async function banCardSecretUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: {
    CareCode: string;
  },
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/care/ban', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 解封卡密 POST /api/care/unban */
export async function unbanCardSecretUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: {
    CareCode: string;
  },
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/care/unban', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 删除卡密 POST /api/care/delete */
export async function deleteCareCodeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: {
    CareCode: string;
  },
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/care/delete', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}
